package com.xz.coursearrange.entity.request;

import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * @Descripe: 管理员添加讲师功能的封装体
 */
@Data
public class TeacherAddRequest implements Serializable {

    private static final long serialVersionUID = -1813688850136803553L;
    private String teacherNo;
    @NotBlank(message = "名字不能为空")
    private String username;

    private String password;

    private String realname;
    @NotBlank(message = "职务不能为空")
    private String jobtitle;
    @NotBlank(message = "教学科目不能为空")
    private String teach;
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String telephone;
    @Email
    private String email;
    @NotBlank(message = "地址不能为空")
    private String address;
    @Min(value = 18,message = "招收童工违法")
    @Max(value = 70,message = "年纪太大了")
    private Integer age;
}
